*CONCORDANCE RATINGS

use "SHG Survey.dta", clear

gen Aft=(TYPE==2) 
label var Aft "Post intervention"
gen SewaV=(avs==1)
label var SewaV "SEWA Village"
gen SM=(q84==1)
replace SM=0 if SewaV==0
replace SM=0 if Aft==0
label var SM "SEWA Member"
gen SewaVXAft=Aft*SewaV
label var SewaVXAft "Sewa V


*Rating of different issues

gen issue1 = 4 - q31_a
gen issue2 = 4 - q31_b
gen issue3 = 4 - q31_c
gen issue4 = 4 - q31_d
gen issue5 = 4 - q31_f
gen issue6 = 4 - q31_g
gen issue7 = 4 - q31_h

replace issue1 = . if q31_a==9|q31_a==.
replace issue2 = . if q31_b==9|q31_b==.
replace issue3 = . if q31_c==9|q31_c==.
replace issue4 = . if q31_d==9|q31_d==.
replace issue5 = . if q31_f==9|q31_f==.
replace issue6 = . if q31_g==9|q31_g==.
replace issue7 = . if q31_h==9|q31_h==.

drop if issue1==.|issue2==.|issue3==.|issue4==.|issue5==.|issue6==.|issue7==.

label var issue1 "water"
label var issue2 "sanitation"
label var issue3 "health"
label var issue4 "electricity"
label var issue5 "education"
label var issue6 "work"
label var issue7 "roads"


*Types of raters

gen control0 = 0
gen treatment0 = 0
gen treatmentA0 = 0
gen treatmentB0 = 0

replace control0 = 1 if SewaV==0&Aft==0
replace treatment0 = 1 if SewaV==1&Aft==0
replace treatmentA0 = 1 if SewaV==1&SM==1&Aft==0
replace treatmentB0 = 1 if SewaV==1&SM==0&Aft==0

gen control1 = 0
gen treatment1 = 0
gen treatmentA1 = 0
gen treatmentB1 = 0

replace control1 = 1 if SewaV==0&Aft==1
replace treatment1 = 1 if SewaV==1&Aft==1
replace treatmentA1 = 1 if SewaV==1&SM==1&Aft==1
replace treatmentB1 = 1 if SewaV==1&SM==0&Aft==1

keep id Village issue? control? treatment? treatmentA? treatmentB?




